package com.cn.jwt.zy.jwt.controller;

import com.cn.jwt.zy.jwt.controller.rquest.UserReq;
import com.cn.jwt.zy.jwt.server.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhangyi
 * @date 2018/12/14 13:48
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * 使用jwt验证接口
     *
     * @return
     */
    @GetMapping("/user")
    private String user(){
        return userService.authc();
    }

    @GetMapping("/auth")
    public String auth(){
        return null;
    }

    @PostMapping("/loginUser")
    public String loginUser(@RequestBody UserReq userReq){
        return "登录操作";
    }

    @PostMapping("/login")
    public String login(@RequestBody UserReq userReq){
        return "登录操作";
    }
}
